﻿Public Class frmTraCuuHocSinh

    Private Sub frmTraCuuHocSinh_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        cboLop.DataSource = LopBUS.SelectAll()
        cboLop.ValueMember = "MALOP"
        cboLop.DisplayMember = "TENLOP"
    End Sub

    Private Sub btnTraCuu_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTraCuu.Click
        Dim maLop As Integer = cboLop.SelectedValue
        dgvDSHS.Rows.Clear()
        For Each k As HocSinhDTO In HocSinhBUS.SelectByMaLop(maLop)
            dgvDSHS.Rows.Add(k.MAHOCSINH, k.TENHOCSINH, k.GIOITINH, k.NGAYSINH, k.DIACHI, k.EMAIL)
        Next
    End Sub
End Class